package com.vonchenchen.simple_downloader;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.vonchenchen.simple_downloader.downloader.DownLoadManager;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        DownLoadManager.init(MainActivity.this);

//        DownLoadTask thread = new DownLoadTask();
//        //thread.start();
//        DownLoadInfo downLoadInfo = new DownLoadInfo();
//        downLoadInfo.localPath = DownLoadManager.PATH_DOWNLOAD+"haha";
//        downLoadInfo.urlStr = "http://dlsw.baidu.com/sw-search-sp/soft/7b/33461/freeime.1406862029.exe";
//
//        thread.setDownLoadInfo(downLoadInfo);
//        thread.execDownLoadTask();

        DownLoadManager.downLoadFromUrl("http://dlsw.baidu.com/sw-search-sp/soft/7b/33461/freeime.1406862029.exe", DownLoadManager.PATH_DOWNLOAD+"haha");
        DownLoadManager.downLoadFromUrl("http://dlsw.baidu.com/sw-search-sp/soft/7b/33461/freeime.1406862029.exe", DownLoadManager.PATH_DOWNLOAD+"hehe");
        DownLoadManager.downLoadFromUrl("http://dlsw.baidu.com/sw-search-sp/soft/7b/33461/freeime.1406862029.exe", DownLoadManager.PATH_DOWNLOAD+"houhou");

        DownLoadManager.downLoadFromUrl("http://dlsw.baidu.com/sw-search-sp/soft/7b/33461/freeime.1406862029.exe", DownLoadManager.PATH_DOWNLOAD+"haha1");
        DownLoadManager.downLoadFromUrl("http://dlsw.baidu.com/sw-search-sp/soft/7b/33461/freeime.1406862029.exe", DownLoadManager.PATH_DOWNLOAD+"hehe1");
        DownLoadManager.downLoadFromUrl("http://dlsw.baidu.com/sw-search-sp/soft/7b/33461/freeime.1406862029.exe", DownLoadManager.PATH_DOWNLOAD+"houhou1");
    }
}
